package com.example.demo.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author fjh
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("exam_paper")
public class ExamPaper {
    @TableId
    private Integer id;
    private String examPaperName;
    private Integer questionCount;
    private Double averageDifficulty;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private String description;
    private Integer totalScore;
    private Integer category;
    private String createUser;
    private Integer repeatValue;
    public void initExamPaper(ExamPaper examPaper){
        this.examPaperName=examPaper.getExamPaperName();
        this.averageDifficulty=examPaper.getAverageDifficulty();
        this.description=examPaper.getDescription();
        this.totalScore=examPaper.getTotalScore();
        this.questionCount=examPaper.getQuestionCount();
        this.category=examPaper.getCategory();
    }
}
